Ext.onReady(function(){

	// WINDOW - ADD JOB
	win = new Ext.Window({
    	layout      : 'fit',
        width       : 500,
        height      : 300,
        closeAction :'hide',
        plain       : true,
		title		: "Add Job's",
        tbar:[
			"<b>Evaluate This CPD:</b>",
            { xtype:"tbfill" },
            { text:"info" }],	
	
	items:[{
    	xtype:"textarea"
	}],
	
	
	
		buttons: [{
        	text     : 'Submit',
            disabled : true
        },{
        	text     : 'Close',
			handler  : function(){
	            win.hide();
        	}
		}]
	});




    // ACTION ADD JOB
    var action_add = new Ext.Action({
        text: 'Add Job',
        iconCls: 'icon-add',
		handler: function(){
            win.show()
        }
    });

    // ACTION REMOVE JOB
    var action_del = new Ext.Action({
        text: 'Remove Job',
        iconCls: 'icon-del'
    });

    // ACTION START JOB
    var action_start = new Ext.Action({
        text: 'Start Job',
        iconCls: 'icon-start'
    });

    // ACTION STOP JOB
    var action_stop = new Ext.Action({
        text: 'Stop Job',
        iconCls: 'icon-stop'
    });
    
    // ACTION SCHEDULE
    var action_schedule = new Ext.Action({
        text: 'Schedule',
        iconCls: 'icon-schedule'
    }); 

    // ACTION INFO
    var action_info = new Ext.Action({
        text: 'Info',
        iconCls: 'icon-info',
		handler: function(){
            Ext.Msg.alert('Information', 'Yet another rapidshare Downloader');
        }
    }); 


var simpleForm = new Ext.FormPanel ({
	title: 'Yet another rapidshare Downloader',
	tbar:[
           	action_add,
           	action_del ,
           	'-',
           	action_start,
           	action_stop,
           	'-',
           	action_schedule,
            '->',
            action_info
	],
	items:[{
    	xtype:"tabpanel",
    	activeTab:0,
    	items:[{
        	xtype:"panel",
        	title:"Main",
        	iconCls:"icon-home"
      	},{
        	xtype:"panel",
        	title:"Downloads",
        	iconCls:"icon-download"
      	},{
        	xtype:"panel",
        	title:"Uploads",
        	iconCls:"icon-upload"
      	}]
	}]
});
	


simpleForm.render ('simple-form'); // render form to simple-form element (see simple-form.html)
});